<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        class Person{
            constructor() {
                this.name = null;
            }
            getName(){
                console.log(this.name);
            }
        }

        const xz = new Person();
        xz.name = '项总'
        xz.getName() 
        const ysg = new Person();
        ysg.name = '袁总';
        ysg.getName()
        //const getName = xz.getName.bind(ysg);
        xz.getName.call(ysg)
    </script>
</head>
<body>
    
</body>
</html>